<template>
  <div class="container">
    <dv-border-box-13 :color="['#2ACBD8', '#2ACBD8']">
      <div class="main">
        <div class="title">{{ data.title }}</div>
        <div class="info">
          <div class="count">{{ data.count ? data.count : '0' }}</div>
          <div class="info-right">
            <div class="p-day">{{ data.pDay }}</div>
            <div class="p-week">{{ data.pWeek }}</div>
          </div>
        </div>
      </div>
    </dv-border-box-13>
  </div>
</template>

<script>
export default {
  name: 'Scoreboard',
  props: {
    data: {
      type: Object,
      default: function () {
        return {
          title: '站点总数',
          count: '11',
          pDay: '日环比:73.49%',
          pWeek: '周环比:34.21%'
        }
      }
    }
  }
}
</script>

<style lang="less" scoped>
.container {
  display: inline-block;
  min-width: 130px;
}

.main {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-left: 20px;
  padding-right: 20px;

  .title {
    font-size: 14px;
    margin-top: 10px;
  }

  .info {
    display: flex;
    align-items: center;

    .count {
      font-size: 32px;
      color: #22e5ff;
      font-weight: bolder;
      margin-right: 3px;
    }

    .info-right {
      color: #02df7a;
      font-size: 12px;
    }
  }
}
</style>
